import request from '../index';
import type { IDataType } from '../types';
import type {
  Count,
  Sale,
  Favor,
  Address,
  Amount
} from '@/store/analysis/types';
enum DashboardAPI {
  categoryGoodsCount = '/goods/category/count',
  categoryGoodsSale = '/goods/category/sale',
  categoryGoodsFavor = '/goods/category/favor',
  addressGoodsSale = '/goods/address/sale',
  amountGoodsList = '/goods/amount/list'
}
export function getCategoryGoodsCount() {
  return request.get<IDataType<Count>>({
    url: DashboardAPI.categoryGoodsCount,
    showLoading: false
  });
}

export function getCategoryGoodsSale() {
  return request.get<IDataType<Sale>>({
    url: DashboardAPI.categoryGoodsSale,
    showLoading: false
  });
}
export function getCategoryGoodsFavor() {
  return request.get<IDataType<Favor>>({
    url: DashboardAPI.categoryGoodsFavor,
    showLoading: false
  });
}
export function getAddressGoodsSale() {
  return request.get<IDataType<Address>>({
    url: DashboardAPI.addressGoodsSale,
    showLoading: false
  });
}
export function getAmountGoodsList() {
  return request.get<IDataType<Amount>>({
    url: DashboardAPI.amountGoodsList
  });
}
